def listsum(numlist):
    theSum = 0
    for i in numlist:
        theSum += i
    return theSum


print(listsum([1, 3, 5, 7, 9]))


def listsum(numlist):
    if len(numlist) == 1:
        return numlist[0]
    else:
        return listsum(numlist[1:]) + numlist[0]


print(listsum([1, 3, 5, 7, 9]))
